﻿<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Bezdelnick
 * Date: 30.04.13
 * Time: 13:42
 * To change this template use File | Settings | File Templates.
 */
include("common/header.php");
include("dao/VoteDao.php");
include("dao/GroupDao.php");

$voteDao = new VoteDao();
$votes = $voteDao->load();

$groupDao = new GroupDao();
$groups = $groupDao->load();
?>

<div class="radius solid-border" style="margin: 50px;">
<form action="vote.php" method="post">
<table class="content-table">
    <tr>
        <td>Тип голосования</td>
        <td>Укажите ваш статус</td>
    </tr>

    <tr>
        <td></td>
        <td>
            <input type="radio" name="status" value="ab"> Абитуриент <br/>
            <input type="radio" name="status" value="st"> Студент <br/>
        </td>
    </tr>

    <tr>
        <td>
            <select name="vote" size="10" style="width: 200px;">
                <? foreach ($votes as $vote) { ?>
                <option value="<?= $vote->getId() ?>"> <?= $vote->getName() ?> </option>
                <? } ?>
            </select>
        </td>
        <td>
            <select name="group" size="10" style="width: 200px;">
                <? foreach ($groups as $group) { ?>
                <option value="<?= $group->getId() ?>"> <?= $group->getName() ?> </option>
                <? } ?>
            </select>
        </td>
    </tr>
    <tr>
        <td colspan="2" style="text-align: right;">
            <input type="submit" value="Пройти голосование"/>
        </td>
    </tr>
</table>
</form>
</div>

<? include("common/footer.php"); ?>

